Skip to content

fix: 회차 스케줄러 버그 수정 (P0 #5, #6, #7)#26

Merged
choihooo merged 2 commits intodevfrom
feat/rounds-scheduler-fixes
Mar 10, 2026
Merged

fix: 회차 스케줄러 버그 수정 (P0 #5, #6, #7)#26
choihooo merged 2 commits intodevfrom
feat/rounds-scheduler-fixes

Conversation

@choihooo
Copy link
Copy Markdown
Collaborator

🎯 Summary

이 PR의 목적을 한 줄로 요약해주세요
회차 스케줄러 관련 P0 버그 3건 수정 (주간 랭킹 날짜 필터, 회차 시작 알림 타임존, isCurrent 플래그 업데이트)


🔴 AS-IS

기존 상태 또는 문제점

🟢 TO-BE

변경 후 상태 또는 개선점


💬 참고사항

리뷰어가 알아야 할 내용, 논의 포인트, 주의사항 등

P0 #5: 주간 랭킹 날짜 필터 추가
- 문제: activityScores 테이블에서 모든 기간의 점수를 합산
- 해결: 이번 주 시작일(~ 00:00:00 KST)부터 종료일(~ 23:59:59.999 KST)까지의 점수만 필터링
- 파일: weekly-ranking.ts

P0 #6: 회차 시작 알림 타임존 수정
- 문제: UTC 기준으로 날짜 비교해서 KST에서 실행 시 날짜 불일치
- 해결: KST (UTC+9) 기준으로 오늘 날짜 구해서 비교
- 파일: round-reporter.ts (sendRoundStartAnnouncement)

P0 #7: 회차 종료 후 isCurrent 플래그 업데이트
- 문제: 회차 리포트 전송 후 isCurrent 플래그가 업데이트되지 않음
- 해결: 다음 회차가 있으면 해당 회차를 current로 설정, 없으면 현재 회차의 isCurrent를 false로 변경
- 파일: round-reporter.ts (sendRoundReport)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@choihooo choihooo requested a review from bbbang105 as a code owner March 10, 2026 08:09
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
study-admin-web Ready Ready Preview, Comment Mar 10, 2026 8:17am

@bbbang105 bbbang105 added the 🚨 fix 버그 수정 / 에러 해결 label Mar 10, 2026
코드 리뷰 사항 반영:
- P0 #6 타임존 처리 로직을 formatKSTDate() 헬퍼 함수로 분리
- 코드 재사용성과 명확성 향상
- KST 오프셋 계산 로직을 함수 내부로 캡슐화

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@bbbang105 bbbang105 added the 🔄 refactor 코드 리팩토링 label Mar 10, 2026
@choihooo choihooo merged commit f582093 into dev Mar 10, 2026
7 checks passed
@choihooo choihooo deleted the feat/rounds-scheduler-fixes branch March 10, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚨 fix 버그 수정 / 에러 해결 🔄 refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants